#ifndef _SPI_H
#define _SPI_H

#define HOST_ID     SPI2_HOST
#define MISO_PIN    GPIO_NUM_19
#define MOSI_PIN    GPIO_NUM_22
#define SCLK_PIN    GPIO_NUM_21
#define CS_PIN      GPIO_NUM_23

void SPI2_Init(void);
unsigned char SPI2_Send_Recv_8bit_Data(unsigned char tx_data);
void SPI2_Send_Recv_n_bit_Data(void* tx_data, void *rx_data, int n);
void SPI2_Set_speed(unsigned int speed);

#endif
